package com.lishe.lishe.lishe.module.me.others;

import android.util.Log;
import android.view.View;

import com.lishe.lishe.R;

/**
 * Created by zhcasecom on 2017/8/22.
 */

public class MyOnClickListener implements View.OnClickListener {
    private String TAG = getClass().getSimpleName();
    private static MyOnClickListener instance = null;

    public MyOnClickListener() {
    }

//    public static MyOnClickListener getInstance() {
//        if (instance == null)
//            instance = new MyOnClickListener();
//        return instance;
//    }

    @Override
    public void onClick(View view) {
        //TODO: do something here
        int index = ((MyButton)view).getIndex();
        switch (view.getId()){
            case R.id.edit_addr:
                Log.e(TAG,"点击了第"+index+"个修改按钮");
                break;
            case R.id.set_remote_address:
                Log.e(TAG,"点击了第"+index+"个设置默认地址按钮");
                break;
        }
    }
}
